#ifndef WRAP_EXECINFO_H
#define WRAP_EXECINFO_H

namespace Wrap {

/// @see https://man7.org/linux/man-pages/man3/backtrace.3.html
/// @return  backtrace() returns the number of addresses returned in @c array,
/// which is not greater than @c size. If the return value is less than @c size,
/// then the full backtrace was stored; if it is equal to @c size, then it may
/// have been truncated, in which case the addresses of the oldest stack frames
/// are not returned.
int backtrace_(void **array, int size);

/// @see https://man7.org/linux/man-pages/man3/backtrace_symbols.3.html
/// @brief should manually free return value
/// @return On success, backtrace_symbols() returns a pointer to the array
/// malloc(3)ed by the call; on error, NULL is returned.
char **backtrace_symbols_(void *const *array, int size);

}

#endif